<template>
	<view>
		<text>我是text组件{{msg}}</text>
		<button type="primary" @click="test">event</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		props:["msg"],
		methods:{
			test(){
				//this.$emit("testShowName",{"name":"admin"});
				
				uni.$emit("testEmit",{"name":"admin"})
			}
		},beforeMount(){
			console.log("在挂在之前被调用")
		},
		mounted() {
			console.log("挂载到实例上去之后调用")
			this.$nextTick(function(){
				//渲染完毕
				console.log("ok")
			})
		}
		
	}
</script>

<style lang="scss">

</style>
